package designpattern.demo.j2ee.businessdelegatepattern;

import designpattern.demo.j2ee.businessdelegatepattern.service.BusinessService;
import designpattern.demo.j2ee.businessdelegatepattern.service.impl.EJBService;
import designpattern.demo.j2ee.businessdelegatepattern.service.impl.JMSService;

public class BusinessLookUp {
    public BusinessService getBusinessService(String serviceType) {
        if (serviceType.equalsIgnoreCase("EJB")) {
            return new EJBService();
        } else {
            return new JMSService();
        }
    }
}